﻿#include"AVLTree.h"

void test()
{
	AVLTree<int, int> a;

	int arr[] = { 4, 2, 6, 1, 3, 5, 15, 7, 16,14 };
	for (auto& ref : arr)  a.Insert(make_pair(ref, ref));

	a.Inorder();
	cout << a.IsAVLTree() << endl;

	

	AVLTree<int, int> b(a);
	b.Inorder();
	cout << a.IsAVLTree() << endl;

	a.Insert(make_pair(20,20));
	b = a;
	b.Inorder();

	AVLTree<string, string> s;
	
	
	s["sort"] = "排序";
	s["computer"] = "电脑";
	s.Inorder();
}


int main()
{
	test();

	return 0;
}